﻿
const exportRoute = (usePlatform)=>{
    let routeList = [
      {
        path: '/user',
        component: '../layouts/UserLayout',
        routes: [
          { path: '/user/login', name: '登录', component: './User/Login' },
          {
            component: '404',
          },
        ],
      },
        {
            name: 'exception',
            icon: 'warning',
            hideInMenu: true,
            path: '/exception',
            routes: [
                // exception
                {
                    path: '/exception/403',
                    name: 'not-permission',
                    hideInMenu: true,
                    component: './Exception/403',
                },
                {
                    path: '/exception/404',
                    name: 'not-find',
                    hideInMenu: true,
                    component: './Exception/404',
                },
                {
                    path: '/exception/500',
                    name: 'server-error',
                    hideInMenu: true,
                    component: './Exception/500',
                },
                {
                    path: '/exception/trigger',
                    hideInMenu: true,
                    name: 'trigger',
                    component: './Exception/TriggerException',
                },
            ],
        },
        // app
        {
            path: '/',
            component: '../layouts/BasicLayout',
            Routes: ['src/pages/Authorized'],
            routes: [



                {
                    path: '/',
                    redirect : '/carouselImage'
                },
                {
                  path: '/carouselImage',
                  component: './carouselImage/List',
                  icon: 'credit-card',
                  name: '轮播图管理',
                  //permission_id: '10001',
                },
                {
                  name :"应用管理",
                  icon: 'align-center',
                  path: '/app',
                  routes:[
                    {
                      path: '/app/Scenic',
                      component: './Scenic/List',
                      name: '景区管理',
                      //permission_id: '10001',
                    },
                    {
                      path: '/app/Traffic',
                      component: './Traffic/List',
                      name: '交通',
                      //permission_id: '10001',
                    },
                    {
                      path: '/app/Hotel',
                      component: './Hotel/List',
                      name: '酒店管理',
                      //permission_id: '10001',
                    },
                    {
                      path: '/app/Estate',
                      component: './Estate/List',
                      name: '房产管理',
                      //permission_id: '10001',
                    },
                    {
                      path: '/app/TrafficShip',
                      component: './TrafficShip/List',
                      name: '邮轮管理',
                      //permission_id: '10001',
                    },
                    {
                      path: '/app/TravelResource',
                      component: './TravelResource/List',
                      name: '旅游资源',
                      //permission_id: '10001',
                    },
                    {
                      path: '/app/TravelNote',
                      component: './TravelNote/List',
                      name: '旅游游记',
                      //permission_id: '10001',
                    },
                  ]
                },
              {
                path: '/UserManage',
                component: './UserManage/List',
                icon: 'user',
                name: '用户管理',
                //permission_id: '10001',
              },
              {
                path: '/browselog',
                component: './BrowseLog',
                icon: 'bars',
                name: '浏览历史',
                //permission_id: '10001',
              },
              {
                path: '/collect',
                component: './Collect',
                icon: 'bars',
                name: '收藏记录',
                //permission_id: '10001',
              },
               /* {
                    name: '用户权限管理',
                    icon: 'warning',
                    path: '/userPermissMag',
                    routes: [
                        {
                            path: '/userPermissMag/UserManage',
                            component: './UserManage/List', //用户管理
                            name: '用户管理',
                            permission_id: '10001',
                        },

                          {
                                path: '/userPermissMag/RoleManage',
                                component: usePlatform? './RoleManage/RoleManage' : './NoPlateformRoleManage/List', //角色管理
                                name: '角色管理',
                                permission_id: '10002',
                            },
                        {
                            path: '/userPermissMag/Organization',
                            component: './Organization/Organization', //组织机构管理
                            name: '组织机构管理',
                            permission_id: '10003',
                        },
                        {
                            path: '/userPermissMag/permisstion',
                            component: './Menu/List', //功能管理
                            name: '功能管理',
                            permission_id: '10004',
                        },

                    ]
                },*/


                {
                    component: '404',
                },

            ],
        },

    ];
    return routeList
}
export default exportRoute